﻿using System.Collections.Generic;

namespace Common.Infrastructure.Service
{
    public interface IMessageService
    {
        string Lang { get; }

        void AddError(string message);

        void AddError(string code, params object[] objs);

        void AddWarning(string message);

        void AddWarning(string code, params object[] objs);

        void AddInfomation(string message);

        void AddInfomation(string code, params object[] objs);

        string GetMessage(string code, params object[] objs);

        void ThrowError(string code, params object[] objs);

        void MessageToActionResult<T>(ApiActionResult<T> actionResult);

        bool HasError();

        List<ApiActionMessage> GetMessages();

        void AddActionMessage(ApiActionMessage actionMessage);
    }
}
